<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>天下第一帅</title>
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
    <script>
        async function show() {
            alert('a');
            await new Promise((resolve,reject)=>{
               setTimeout(function () {
                   resolve();
               },5000)
            });//此处会检测一下此处是不是异步操作，不是异步操作就不会等
            alert('b')
        }
        show();//直接执行
    </script>
</head>
<body>

</body>
</html>